home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 050a / alpha.zip / ALPHA.DOC next >
Text File  |  1990-08-04  |  20KB  |  498 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.                              MANUAL
  9.  
  10.                                for
  11.  
  12.                             AlphaSort
  13.  
  14.                 The FASTEST sorting program ever
  15.  
  16.                Copyright 1990 by Arrow Connection
  17.                            PO Box 899
  18.                      Pollock Pines, CA 95726
  19.  
  20.                        All rights reserved
  21.  
  22.  
  23.  
  24.  
  25.  
  26. DISCLAIMER
  27.  
  28. Arrow Connection hereby disclaims all warranties relating to this 
  29. software, whether express or implied, including without 
  30. limitation any implied warranties of merchantability or fitness 
  31. for a particular purpose. Arrow Connection will not be liable for 
  32. any special, incidential, consequential, indirect or similar 
  33. damages due to loss of data or any other reason, even if Arrow 
  34. Connection has been advised of the possibility of such damages. 
  35. In no event shall Arrow Connection's liability for any damages 
  36. ever exceed the price paid for the software, regardless of the 
  37. form of the claim. The person using the software bears all risk 
  38. as to the quality and performance of the software.
  39.  
  40.  
  41. DEFINITION OF SHAREWARE
  42.  
  43. Shareware distribution gives you a chance to try software before
  44. buying it. If you try a Shareware program and continue using it,
  45. you are expected to register. If you wish to register, see the
  46. ALPHA.REG file. As a registered owner, you receive the lastest
  47. update and you qualify to earn commissions for distributing AlphaSort.
  48.  
  49. Copyright laws apply to both Shareware and commercial software,
  50. and the copyright holder retains all rights, with a few specific
  51. exceptions as stated below. Shareware authors are accomplished
  52. programmers, just like commercial authors, and the programs are
  53. of comparable quality. (In both cases, there are good programs
  54. and bad ones!) The main difference is in the method of
  55. distribution.
  56.  
  57. Shareware is a distribution method, not a type of software. You
  58. should find software that suits your needs and pocketbook,
  59. whether it's commercial or Shareware. The Shareware system makes
  60. fitting your needs easier, because you can try before you buy.
  61. And because the overhead is low, prices are low also. Shareware
  62. has the ultimate money-back guarantee -- if you don't use the
  63. product, you don't pay for it.
  64.  
  65. AlphaSort is a "shareware program" and is provided at no charge
  66. to the user for evaluation.  Feel free to share it with your
  67. friends, but please do not give it away altered or as part of
  68. another system.  The essence of "user-supported" software is to
  69. provide personal computer users with quality software without
  70. high prices, and yet to provide incentive for programmers to
  71. continue to develop new products.  If you find this program
  72. useful and find that you are using AlphaSort and continue to use
  73. AlphaSort after a reasonable trial period, you must make the
  74. registration payment to Arrow Connection.  The registration
  75.  
  76. fee will license one copy for use on any one computer at any
  77. one time.  You must treat this software just like a book.  An
  78. example is that this software may be used by any number of
  79. people and may be freely moved from one computer location to
  80. another, so long as there is no possibility of it being used
  81. at one location while it's being used at another. Just as a
  82. book cannot be read by two different persons at the same time.
  83.  
  84. You are encouraged to pass a copy of AlphaSort along to your
  85. friends, upload it onto bulletin boards, and publicize it in
  86. your trade association newsletter. Please encourage them to
  87. register their copy if they find that they can use it. Remember,
  88. as a registered owner, you earn a commission for each one who
  89. registers from your copy.
  90.  
  91.  
  92.  
  93.  
  94.                       TABLE OF CONTENTS
  95.  
  96.  
  97.  1.  Introduction--Getting Started....................... 1
  98.  2.  How to Get Help..................................... 1
  99.  3.  The Opening Menu.................................... 2
  100.  4.  Input File Options.................................. 3
  101.  5.  Output File Options................................. 4
  102.  6.  Format Options...................................... 5
  103.  7.  Saving the Current Options.......................... 7
  104.  8.  Common Problems and their Solutions................. 7
  105.  9.  How to Obtain the Source Code....................... 8
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112. 1.  INTRODUCTION--GETTING STARTED
  113.  
  114. To use the program, type ALPHA at the DOS prompt.
  115. Example:
  116.                      C:>ALPHA
  117. Finish with ENTER (or RETURN) and the program will start.
  118. The program is menu-driven; so you can probably use it 
  119. without reading this manual.
  120.  
  121.                             -1-
  122.  
  123.  
  124. The files on disk are:
  125.      ALPHA.EXE   (The main program)
  126.      ALPHA.DOC   (The documentation file you are now reading)
  127.      ALPHA.REG   (The registration form)
  128.  
  129. This program can sort data from these kinds of files:
  130.    1.  Text file in which each field is on a separate line
  131.    2.  Comma delimited file, such as a WordStar mailmerge file
  132.    3.  A WordPerfect mailmerge file
  133. If yours is a database file, then use your database program
  134. to export it into one of these three formats.  Text files should 
  135. have one field per line, and one and only one extra line 
  136. space between records.  Comma delimited files may contain a 
  137. comma within a field if that field is surrounded by quotes, 
  138. a field may contain single quotes if the field is surrounded 
  139. by double quotes, and a field may contain double quotes, if 
  140. that field is surrounded by single quotes.  All files should 
  141. have no extra junk at the top of the file--the first line of 
  142. the file should have the first field.
  143.  
  144. A record is a set of data, such as name and address.  A 
  145. field is part of a record.  For example, three fields in a 
  146. record might be name, city, and zip code.
  147.  
  148. Each field can be a maximum of 30 characters wide.
  149. Each record can have a maximum of 10 fields.
  150. Each file can have a maximum of 8000 records.
  151. This program sorts on any one field.
  152.  
  153. Output can go to a file, printer, or to the screen.
  154. You may select any field in any order to be output.
  155. You may skip fields.  You may repeat fields.
  156. Output to a file can be either mailmerge or a regular
  157. text file.
  158.  
  159. To avoid answering a prompt on the screen, press ENTER.  
  160. That will take you back to a previous menu.  Pressing ESC 
  161. has the same effect if the computer is expecting a one- 
  162. keystroke answer.
  163.  
  164.  
  165. 2.  HOW TO GET HELP
  166.  
  167. To get help send a description of your problem, along with a 
  168. sample of files you are using, and return postage to:
  169.             Arrow Connection
  170.             P.O. Box 899
  171.             Pollock Pines CA 95726
  172. Telephone support for 90 days is available by calling:
  173.             (916) 644-2341
  174.  
  175.                             -2-
  176.  
  177.  
  178. 3.  THE OPENING MENU
  179.  
  180. The opening menu looks like this:
  181. ----------------------------------------------------------------- 
  182. To change any option, press the corresponding letter.
  183. To begin sorting, press ENTER.
  184.  
  185. N  Name of file to sort:
  186. I  Input file type:
  187.    (Options are text file with each field on a separate line,
  188.    comma delimited file, or WordPerfect mailmerge file.)
  189. T  Total fields in each record:
  190. K  Key field to sort on:
  191. V  View first record of file on screen
  192. D  Destination file name:
  193. O  Output:
  194.    (Options are printer, screen, text file, comma delimited file,
  195.    or WordPerfect mailmerge file.)
  196. F  Format of output:
  197.    (Options are any field in any order.  If not a mailmerge file,
  198.    then you may also specify spaces or returns to follow each field.
  199. S  Save current options on disk for automatic recall
  200. H  Help (view or print documentation)
  201. Q  Quit
  202.  
  203. Enter choice (press ENTER to begin sort):
  204. ------------------------------------------------------------ 
  205. This menu allows you to select only the choice or choices 
  206. that you want.  Usually you will not need to go through all 
  207. the choices.  If any option is OK as is, then leave it 
  208. alone.  Change only what needs changing.  When the choices 
  209. are set up the way you want, then you are ready to sort.
  210.  
  211. To sort, just press ENTER when the prompt at the bottom of 
  212. the screen says in parentheses: press ENTER to begin sort. 
  213. When the computer is done sorting, it will display the 
  214. number of records sorted.  To run the program again, either 
  215. type ALPHA at the DOS prompt or press F3 and ENTER.
  216.  
  217.                             -3-
  218.  
  219.  
  220. 4.  INPUT FILE OPTIONS
  221.  
  222. The first 5 options on the opening menu relate to your input 
  223. file, namely N, I, T, K, and V.
  224.  
  225. To name an input file, press N.  On the screen you will see:
  226.  
  227.       Enter filename to sort (press ENTER to quit):
  228.  
  229. Path names are OK as part of your answer.  When you enter a 
  230. filename the computer will read the first part of the file 
  231. in order to figure out what kind of file it is.  It will 
  232. decide if the file is a text file, comma delimited file 
  233. (such as a WordStar mailmerge file), or a WordPerfect 
  234. mailmerge file.  When it decides what kind of file it is, it 
  235. will display that information next to the I option.  So if 
  236. the computer decides correctly, then you do not need to 
  237. press I in order to tell it what kind of input file it is.  
  238. If the computer decides incorrectly, then press I, and tell 
  239. the computer what kind of input file it is.
  240.  
  241. As the computer checks the file for what kind it is, it also 
  242. checks to see how many fields it has.  If the file is a 
  243. comma delimited file, then it counts commas that have no 
  244. space after them in order to figure out how many fields 
  245. there are.  If the file is a WordPerfect mailmerge file, 
  246. then the computer counts lines until it reaches a control E 
  247. which signals the end of the record.  In this kind of file, 
  248. if you have two lines in one field, then AlphaSort will 
  249. count them as two separate fields.  That being the case, 
  250. make sure that all your records are consistent.  In other 
  251. words, if one record has a two-line field, then all of them 
  252. must have the identical two-line field in order to keep 
  253. things from getting mixed up.  If the file is a text file, 
  254. then the computer counts lines until it reaches a blank line 
  255. in order to calculate the number of fields.  So make sure 
  256. that your first record of a text file has no blank lines in 
  257. the wrong place.  If you have no data to put on that line, 
  258. then put a hyphen there.  The first blank line should be 
  259. after the last field of the first record.  Thereafter, blank 
  260. lines may occur within records, and one (and only one) blank 
  261. line MUST occur between records.
  262.  
  263. After the computer calculates how many fields your file has, 
  264. it displays that information after the T option (total 
  265. fields).  If the computer figures incorrectly, then press T 
  266. to tell it how many total fields are in each record.
  267.  
  268. Any time that you name a new file or change the number of total 
  269. fields in a file, you should also press F (explained later) 
  270. to check the format of the output.  The computer will not 
  271. automatically take you to F like it does some of the other options.
  272.  
  273.                             -4-
  274.  
  275.  
  276. To summarize, first press N to name the file to sort.  Then 
  277. look at the display of the opening menu to see if input file 
  278. is of the correct type (option I) and to see if the total 
  279. fields in each record is correct (option T).
  280.  
  281. The next option, the K option, specifies the key field to 
  282. sort on.  Do you want to sort by last name, by zip code, or 
  283. by what?  Sorting will take place on any one field you 
  284. specify.  If the number of the field displayed there is not 
  285. the number you want, then press K, and the computer will ask 
  286. you:
  287.  
  288.           Enter number of field by which to sort:
  289.  
  290. Whenever the computer asks you for a number, it has decided 
  291. ahead of time what numbers are valid answers.  If one-digit 
  292. numbers are the only possible answer, then one keystroke 
  293. answers the question--no RETURN is needed.  But if a two- 
  294. digit number is a possible answer, then you must press 
  295. RETURN (or ENTER) after you enter the number(s).
  296.  
  297. Suppose you want to sort by company name, but you forget if 
  298. that is field 2 or field 3.  That is why option V is on the 
  299. menu.  Press V to view the first record of your file.  That 
  300. let's you see what your file looks like without exiting 
  301. AlphaSort.  When you view your first record, note what 
  302. number each field is, and then go back to the main menu to 
  303. choose other options.
  304.  
  305.  
  306. 5.  OUTPUT FILE OPTIONS
  307.  
  308. The next three options on the menu are for your output file, 
  309. namely options D and O and F.  Option D (destination file) 
  310. and option O (output) are discussed in this section; option 
  311. F (format) will be discussed in the next section.  To name a 
  312. destination file press D, and the computer will ask you:
  313.  
  314.      Enter destination file name (press ENTER to quit):
  315.  
  316. If a destination file of the same name already exists on 
  317. disk, the computer will warn you and give you the option of 
  318. erasing it or not.  Also, any time an existing file is in 
  319. danger of being erased, it will display on the main menu 
  320. next to the destination filename in blinking letters:
  321.               EXISTING FILE WILL BE ERASED
  322.  
  323.                             -5-
  324.  
  325.  
  326. To specify the type of output, press O.  The computer will 
  327. give you five choices:
  328. ------------------------------------------------------------ 
  329. Your output choices are:
  330.    T  Text file
  331.    C  Comma delimited file, such as a WordStar mailmerge file
  332.    W  WordPerfect mailmerge file
  333.    P  Printer
  334.    S  Screen
  335. Enter choice:
  336. ------------------------------------------------------------ 
  337. These choices will also appear automatically after you 
  338. choose a destination filename if the computer does not yet 
  339. know what kind of file you want.
  340.  
  341. 6.  FORMAT OPTIONS
  342.  
  343. The F option lets you format your output.  Formatting lets 
  344. you do two things: it lets you specify the order in which 
  345. the fields will be output, and it lets you specify whether 
  346. spaces or returns should follow each field.  In other words, 
  347. you can make the output look entirely different than the input.
  348.  
  349. When you press F the computer displays the current setup at 
  350. the top of the screen.  The display shows consecutive 
  351. numbers in the left column, the field number to be output in 
  352. the second column, and what follows the field (either 
  353. returns or spaces) in the third column.  If the output type 
  354. is a comma delimited file or a WordPerfect mailmerge file, 
  355. then the third column is missing because it does not apply 
  356. in those cases, and the F option below the display will also 
  357. be missing.  An example of this display is:
  358. ------------------------------------------------------------ 
  359. 1:  Field 1  1 space(s) follows
  360. 2:  Field 2  1 return(s) follows
  361. 3:  Field 3  2 return(s) follows
  362.  
  363. Press O to change the order of the fields.
  364. Press F to change the returns or spaces that follow the fields.
  365. Enter O or F (ENTER to exit):
  366. ------------------------------------------------------------ 
  367. Notice that this setup has one space following field one.  
  368. You will want to do this after your city field, so that the 
  369. state follows on the same line with only a space between 
  370. them.   Notice that two returns follow field 3.  You will 
  371. want to set up yours this way if you want an extra return 
  372. between records.  You are not limited to one or two spaces 
  373. or returns after each field--you can have several.  This 
  374. sample setup has the fields output in order, field 1 is 
  375. first, field 2 is second, and field 3 is third.  But you can 
  376. change the order if you wish.
  377.  
  378.                             -6-
  379.  
  380.  
  381. To change the order, press O.  Then the computer will ask 
  382. you:
  383. ------------------------------------------------------------ 
  384. You have 3 fields.  You may output them in any order.
  385. You may skip fields.  You may repeat fields.
  386. Enter number of first field to output (press ENTER to exit): 
  387. ------------------------------------------------------------ 
  388. After you enter the number of the first field, the computer 
  389. will ask you for the number of the next field, and so on.  
  390. The computer will let you specify up to 10 output fields. 
  391. When done, press ENTER in response to the question.  Then 
  392. the computer will display the new order of fields and give 
  393. you a chance to change them again if they are wrong.
  394.  
  395. The order of the fields is the first half of formatting.  
  396. The second half is deciding whether returns or spaces follow 
  397. each field.  (Remember, this applies only if your output goes 
  398. to a text file, printer or screen--it does not apply for 
  399. comma delimited files or WordPerfect mailmerge files.)  To 
  400. format returns and spaces, you have first pressed F at the 
  401. main menu.  This yields a display of the current setup as 
  402. shown above.  Then given a choice to press O (to order the 
  403. fields) or to press F (to format returns and spaces) you 
  404. press F again.  The computer gives you this prompt:
  405.  
  406.     Enter number from left column (ENTER to exit):
  407.  
  408. Enter the number of the line that you want to change.  Then 
  409. the computer asks you:
  410.  
  411.     Press R if you want return(s) to follow this field.
  412.     Press S if you want space(s) to follow this field.
  413.     Enter R or S (ENTER to exit): 
  414.  
  415. After you enter R (for return) or S (for space) the computer 
  416. will ask you how many.  For example, if you had pressed R, 
  417. the computer will prompt you:
  418.  
  419.     Enter number of return(s) to follow: 
  420.  
  421. After you answer this question with a number, the new 
  422. information will display at the top of the screen.  Then you 
  423. can change another line or press ENTER to go back to the 
  424. main menu.
  425.  
  426.                             -7-
  427.  
  428.  
  429. 7.  SAVING THE CURRENT OPTIONS
  430.  
  431. Saving the current options on disk today saves you time 
  432. tomorrow.  The options that are saved are automatically 
  433. recalled so that you don't have to set them all over again.  
  434. When you press S, the computer saves on disk all that it 
  435. currently knows, including the filename to sort, the 
  436. destination filename, the number of fields, the order the 
  437. fields are output, and the format in which they are output.  
  438. These options are saved in a file called ALPHA.OPT.
  439. When you press S a prompt at the bottom of the screen will 
  440. assure you that the job is done:
  441.  
  442.    Options are now saved for automatic recall next time.
  443.  
  444.  
  445. 8.  COMMON PROBLEMS AND THEIR SOLUTIONS
  446.  
  447. If the last part of some fields are getting chopped off, 
  448. remember that the maximum width of fields is 30. 
  449.  
  450. If the last part of the file gets chopped off, remember that 
  451. the maximum length of a file is 8000 records.
  452.  
  453. If fields get jumbled up, check to make sure that your file 
  454. has no more than 10 fields per record.  If yours is a text 
  455. file that is not a mailmerge file, then make sure that the 
  456. first line is the first field, and make sure that one and 
  457. only one blank line occurs between records.  If you have 
  458. blank fields, then in the first record insert hyphens there; 
  459. in later records leave a blank line there.
  460.  
  461. If the computer has trouble reading your file, check to make 
  462. sure that no extra junk is at the top or at the bottom of 
  463. the file.  If yours is a database file, remember to use your 
  464. database program to create a regular text file.
  465.  
  466. If the output comes out looking funny, check the F option 
  467. (to format your output).
  468.  
  469. If output won't go to the printer, then press D to name a 
  470. destination file, and answer with either PRN, LPT1, LPT2, 
  471. LPT3 (all these are parallel ports going to your printer), 
  472. or COM1, COM2, COM3, COM4 (all these are serial ports going 
  473. to your printer).  When the computer asks if you want to 
  474. delete the existing file, answer Y.  Then press O (to 
  475. specify output type) and answer with T (for text file, NOT P 
  476. for printer).  One of these combinations should direct 
  477. output to the proper printer port of your computer.
  478.  
  479.                             -8-
  480.  
  481.  
  482. 9.  HOW TO OBTAIN THE SOURCE CODE
  483.  
  484. AlphaSort is designed to demonstrate the speed of its new 
  485. sorting algorithm.  It is an enhancement of the old radix 
  486. method of sorting.  If you know anything about the old radix 
  487. method you know that it was potentially efficient, but it 
  488. had some limitations and shortcomings.  Those limitations 
  489. have now been overcome.
  490.  
  491. The Turbo Pascal source code of the sorting algorithm is 
  492. available to programmers who want to use it in their own 
  493. programs.  There is a nominal fee and nominal royalties.  
  494. For more information, call me, Al Beechick, at (916) 644- 
  495. 2341. Or write Arrow Connection, PO Box 899, Pollock Pines, 
  496. CA 95726.
  497.  
  498.